#ifndef CSTRING_HELPER_H
#define CSTRING_HELPER_H
#include "common/commonDefFun.h"

namespace libcvos_vfr
{
	namespace Helper
	{
		TOOL_SDK_API bool DLL_SPEC Tool_ReplaceStringInStd(const char* strOrigin, const char* strToReplace, const char* strNewChar, char* finalStringBuf, int bufLen );

		TOOL_SDK_API bool DLL_SPEC Tool_CheckIfMatchExpressions(const char* targetCharSequence, const char* regularExpression);

		//TOOL_SDK_API std::vector<int> DLL_SPEC Tool_getAllNumberFromString(const char *srcString);

		/**
		 * @brief Tool_separate_single_number_from_string :Extracting a single numeric character and converting it into a number, e.g. the string "123,f6-7" will return {1,2,3,6,7}
		 * @param numString  : original string
		 * @return An array of characters to be extracted
		 */
		//TOOL_SDK_API std::vector<int> DLL_SPEC Tool_separate_single_number_from_string(const char* numString);

		TOOL_SDK_API int DLL_SPEC Tool_CopyStringToBuffer(char *bufer, int bufLen, const char *srcStr);

//#ifdef _WIN32
//		TOOL_SDK_API std::wstring DLL_SPEC Tool_string2wstring(std::string strSrc);
//		TOOL_SDK_API std::string DLL_SPEC Tool_wstring2string(std::wstring strSrc);
//#endif // WIN32

		TOOL_SDK_API bool DLL_SPEC Tool_GetDataAttributFromAppenedInfo(
			const char* pszAppendInfo,
			const char* strItemName,
			const char* strAttributeName,
			char *pszRstBuf,
			int *piRstBufLen);

		TOOL_SDK_API bool DLL_SPEC Tool_GetTextNodeFromXML(const char* XmlInfoBuf, const char* NodeName, char* ValueBuf, int bufLength);
		
        //TOOL_SDK_API std::vector<std::string> DLL_SPEC Tool_SplitStringFromNewLine(const std::string& strBuf);

		//TOOL_SDK_API std::vector<std::string> DLL_SPEC Tool_getStringbyRegexFormat(const std::string& strSource, const std::string& regexFormat);

		TOOL_SDK_API bool DLL_SPEC Tool_remove_consecutive_spaces(const char* str, char* finalStringBuf, int bufLen);
		
		TOOL_SDK_API bool DLL_SPEC Tool_Trim(const char* src, char* finalStringBuf, int bufLen);

		TOOL_SDK_API bool DLL_SPEC Tool_ByteToString(const char* pbData, int iLen, char* finalStringBuf, int bufLen);

		//TOOL_SDK_API std::string DLL_SPEC Tool_vecToString(const std::vector<uint8_t>& vec);
	}
}

#endif
